package com.example.demo.common.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class RecordExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public RecordExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andRidIsNull() {
            addCriterion("rid is null");
            return (Criteria) this;
        }

        public Criteria andRidIsNotNull() {
            addCriterion("rid is not null");
            return (Criteria) this;
        }

        public Criteria andRidEqualTo(Integer value) {
            addCriterion("rid =", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidNotEqualTo(Integer value) {
            addCriterion("rid <>", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidGreaterThan(Integer value) {
            addCriterion("rid >", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidGreaterThanOrEqualTo(Integer value) {
            addCriterion("rid >=", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidLessThan(Integer value) {
            addCriterion("rid <", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidLessThanOrEqualTo(Integer value) {
            addCriterion("rid <=", value, "rid");
            return (Criteria) this;
        }

        public Criteria andRidIn(List<Integer> values) {
            addCriterion("rid in", values, "rid");
            return (Criteria) this;
        }

        public Criteria andRidNotIn(List<Integer> values) {
            addCriterion("rid not in", values, "rid");
            return (Criteria) this;
        }

        public Criteria andRidBetween(Integer value1, Integer value2) {
            addCriterion("rid between", value1, value2, "rid");
            return (Criteria) this;
        }

        public Criteria andRidNotBetween(Integer value1, Integer value2) {
            addCriterion("rid not between", value1, value2, "rid");
            return (Criteria) this;
        }

        public Criteria andEidIsNull() {
            addCriterion("eid is null");
            return (Criteria) this;
        }

        public Criteria andEidIsNotNull() {
            addCriterion("eid is not null");
            return (Criteria) this;
        }

        public Criteria andEidEqualTo(Integer value) {
            addCriterion("eid =", value, "eid");
            return (Criteria) this;
        }

        public Criteria andEidNotEqualTo(Integer value) {
            addCriterion("eid <>", value, "eid");
            return (Criteria) this;
        }

        public Criteria andEidGreaterThan(Integer value) {
            addCriterion("eid >", value, "eid");
            return (Criteria) this;
        }

        public Criteria andEidGreaterThanOrEqualTo(Integer value) {
            addCriterion("eid >=", value, "eid");
            return (Criteria) this;
        }

        public Criteria andEidLessThan(Integer value) {
            addCriterion("eid <", value, "eid");
            return (Criteria) this;
        }

        public Criteria andEidLessThanOrEqualTo(Integer value) {
            addCriterion("eid <=", value, "eid");
            return (Criteria) this;
        }

        public Criteria andEidIn(List<Integer> values) {
            addCriterion("eid in", values, "eid");
            return (Criteria) this;
        }

        public Criteria andEidNotIn(List<Integer> values) {
            addCriterion("eid not in", values, "eid");
            return (Criteria) this;
        }

        public Criteria andEidBetween(Integer value1, Integer value2) {
            addCriterion("eid between", value1, value2, "eid");
            return (Criteria) this;
        }

        public Criteria andEidNotBetween(Integer value1, Integer value2) {
            addCriterion("eid not between", value1, value2, "eid");
            return (Criteria) this;
        }

        public Criteria andRstarttimeIsNull() {
            addCriterion("rStartTime is null");
            return (Criteria) this;
        }

        public Criteria andRstarttimeIsNotNull() {
            addCriterion("rStartTime is not null");
            return (Criteria) this;
        }

        public Criteria andRstarttimeEqualTo(Date value) {
            addCriterion("rStartTime =", value, "rstarttime");
            return (Criteria) this;
        }

        public Criteria andRstarttimeNotEqualTo(Date value) {
            addCriterion("rStartTime <>", value, "rstarttime");
            return (Criteria) this;
        }

        public Criteria andRstarttimeGreaterThan(Date value) {
            addCriterion("rStartTime >", value, "rstarttime");
            return (Criteria) this;
        }

        public Criteria andRstarttimeGreaterThanOrEqualTo(Date value) {
            addCriterion("rStartTime >=", value, "rstarttime");
            return (Criteria) this;
        }

        public Criteria andRstarttimeLessThan(Date value) {
            addCriterion("rStartTime <", value, "rstarttime");
            return (Criteria) this;
        }

        public Criteria andRstarttimeLessThanOrEqualTo(Date value) {
            addCriterion("rStartTime <=", value, "rstarttime");
            return (Criteria) this;
        }

        public Criteria andRstarttimeIn(List<Date> values) {
            addCriterion("rStartTime in", values, "rstarttime");
            return (Criteria) this;
        }

        public Criteria andRstarttimeNotIn(List<Date> values) {
            addCriterion("rStartTime not in", values, "rstarttime");
            return (Criteria) this;
        }

        public Criteria andRstarttimeBetween(Date value1, Date value2) {
            addCriterion("rStartTime between", value1, value2, "rstarttime");
            return (Criteria) this;
        }

        public Criteria andRstarttimeNotBetween(Date value1, Date value2) {
            addCriterion("rStartTime not between", value1, value2, "rstarttime");
            return (Criteria) this;
        }

        public Criteria andRendtimeIsNull() {
            addCriterion("rEndTime is null");
            return (Criteria) this;
        }

        public Criteria andRendtimeIsNotNull() {
            addCriterion("rEndTime is not null");
            return (Criteria) this;
        }

        public Criteria andRendtimeEqualTo(Date value) {
            addCriterion("rEndTime =", value, "rendtime");
            return (Criteria) this;
        }

        public Criteria andRendtimeNotEqualTo(Date value) {
            addCriterion("rEndTime <>", value, "rendtime");
            return (Criteria) this;
        }

        public Criteria andRendtimeGreaterThan(Date value) {
            addCriterion("rEndTime >", value, "rendtime");
            return (Criteria) this;
        }

        public Criteria andRendtimeGreaterThanOrEqualTo(Date value) {
            addCriterion("rEndTime >=", value, "rendtime");
            return (Criteria) this;
        }

        public Criteria andRendtimeLessThan(Date value) {
            addCriterion("rEndTime <", value, "rendtime");
            return (Criteria) this;
        }

        public Criteria andRendtimeLessThanOrEqualTo(Date value) {
            addCriterion("rEndTime <=", value, "rendtime");
            return (Criteria) this;
        }

        public Criteria andRendtimeIn(List<Date> values) {
            addCriterion("rEndTime in", values, "rendtime");
            return (Criteria) this;
        }

        public Criteria andRendtimeNotIn(List<Date> values) {
            addCriterion("rEndTime not in", values, "rendtime");
            return (Criteria) this;
        }

        public Criteria andRendtimeBetween(Date value1, Date value2) {
            addCriterion("rEndTime between", value1, value2, "rendtime");
            return (Criteria) this;
        }

        public Criteria andRendtimeNotBetween(Date value1, Date value2) {
            addCriterion("rEndTime not between", value1, value2, "rendtime");
            return (Criteria) this;
        }

        public Criteria andIsabsentIsNull() {
            addCriterion("isAbsent is null");
            return (Criteria) this;
        }

        public Criteria andIsabsentIsNotNull() {
            addCriterion("isAbsent is not null");
            return (Criteria) this;
        }

        public Criteria andIsabsentEqualTo(Short value) {
            addCriterion("isAbsent =", value, "isabsent");
            return (Criteria) this;
        }

        public Criteria andIsabsentNotEqualTo(Short value) {
            addCriterion("isAbsent <>", value, "isabsent");
            return (Criteria) this;
        }

        public Criteria andIsabsentGreaterThan(Short value) {
            addCriterion("isAbsent >", value, "isabsent");
            return (Criteria) this;
        }

        public Criteria andIsabsentGreaterThanOrEqualTo(Short value) {
            addCriterion("isAbsent >=", value, "isabsent");
            return (Criteria) this;
        }

        public Criteria andIsabsentLessThan(Short value) {
            addCriterion("isAbsent <", value, "isabsent");
            return (Criteria) this;
        }

        public Criteria andIsabsentLessThanOrEqualTo(Short value) {
            addCriterion("isAbsent <=", value, "isabsent");
            return (Criteria) this;
        }

        public Criteria andIsabsentIn(List<Short> values) {
            addCriterion("isAbsent in", values, "isabsent");
            return (Criteria) this;
        }

        public Criteria andIsabsentNotIn(List<Short> values) {
            addCriterion("isAbsent not in", values, "isabsent");
            return (Criteria) this;
        }

        public Criteria andIsabsentBetween(Short value1, Short value2) {
            addCriterion("isAbsent between", value1, value2, "isabsent");
            return (Criteria) this;
        }

        public Criteria andIsabsentNotBetween(Short value1, Short value2) {
            addCriterion("isAbsent not between", value1, value2, "isabsent");
            return (Criteria) this;
        }

        public Criteria andRrverworkIsNull() {
            addCriterion("rRverwork is null");
            return (Criteria) this;
        }

        public Criteria andRrverworkIsNotNull() {
            addCriterion("rRverwork is not null");
            return (Criteria) this;
        }

        public Criteria andRrverworkEqualTo(Date value) {
            addCriterion("rRverwork =", value, "rrverwork");
            return (Criteria) this;
        }

        public Criteria andRrverworkNotEqualTo(Date value) {
            addCriterion("rRverwork <>", value, "rrverwork");
            return (Criteria) this;
        }

        public Criteria andRrverworkGreaterThan(Date value) {
            addCriterion("rRverwork >", value, "rrverwork");
            return (Criteria) this;
        }

        public Criteria andRrverworkGreaterThanOrEqualTo(Date value) {
            addCriterion("rRverwork >=", value, "rrverwork");
            return (Criteria) this;
        }

        public Criteria andRrverworkLessThan(Date value) {
            addCriterion("rRverwork <", value, "rrverwork");
            return (Criteria) this;
        }

        public Criteria andRrverworkLessThanOrEqualTo(Date value) {
            addCriterion("rRverwork <=", value, "rrverwork");
            return (Criteria) this;
        }

        public Criteria andRrverworkIn(List<Date> values) {
            addCriterion("rRverwork in", values, "rrverwork");
            return (Criteria) this;
        }

        public Criteria andRrverworkNotIn(List<Date> values) {
            addCriterion("rRverwork not in", values, "rrverwork");
            return (Criteria) this;
        }

        public Criteria andRrverworkBetween(Date value1, Date value2) {
            addCriterion("rRverwork between", value1, value2, "rrverwork");
            return (Criteria) this;
        }

        public Criteria andRrverworkNotBetween(Date value1, Date value2) {
            addCriterion("rRverwork not between", value1, value2, "rrverwork");
            return (Criteria) this;
        }

        public Criteria andRdateIsNull() {
            addCriterion("rDate is null");
            return (Criteria) this;
        }

        public Criteria andRdateIsNotNull() {
            addCriterion("rDate is not null");
            return (Criteria) this;
        }

        public Criteria andRdateEqualTo(Date value) {
            addCriterionForJDBCDate("rDate =", value, "rdate");
            return (Criteria) this;
        }

        public Criteria andRdateNotEqualTo(Date value) {
            addCriterionForJDBCDate("rDate <>", value, "rdate");
            return (Criteria) this;
        }

        public Criteria andRdateGreaterThan(Date value) {
            addCriterionForJDBCDate("rDate >", value, "rdate");
            return (Criteria) this;
        }

        public Criteria andRdateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("rDate >=", value, "rdate");
            return (Criteria) this;
        }

        public Criteria andRdateLessThan(Date value) {
            addCriterionForJDBCDate("rDate <", value, "rdate");
            return (Criteria) this;
        }

        public Criteria andRdateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("rDate <=", value, "rdate");
            return (Criteria) this;
        }

        public Criteria andRdateIn(List<Date> values) {
            addCriterionForJDBCDate("rDate in", values, "rdate");
            return (Criteria) this;
        }

        public Criteria andRdateNotIn(List<Date> values) {
            addCriterionForJDBCDate("rDate not in", values, "rdate");
            return (Criteria) this;
        }

        public Criteria andRdateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("rDate between", value1, value2, "rdate");
            return (Criteria) this;
        }

        public Criteria andRdateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("rDate not between", value1, value2, "rdate");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}